//
//  TWBaseViewModel.h
//  TWHomework-WeChat
//
//  Created by wzb on 2019/11/12.
//  Copyright © 2019 WZB. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "TWWebClient.h"

NS_ASSUME_NONNULL_BEGIN

@interface TWBaseViewModel : NSObject

// 成功回调
typedef void(^TWSuccessBlock)(id result);
// 失败回调
typedef void(^TWFailureBlock)(NSString *errorString);

/**
 * 注册某个请求
 */
- (void)registerRequest:(NSURLSessionDataTask *)operation;

/**
 * 取消所有请求
 */
- (void)cancelAllHTTPRequest;

@end

NS_ASSUME_NONNULL_END
